package divinity.weapons
{
	import flash.geom.Point;
	
	import divinity.objects.ActiveObject;
	import divinity.utils.Calculator;

	public class Weapon extends ActiveObject
	{
		private var _damage:Number=10;
		private var _vsLight:Number=1;
		private var _vsMedium:Number=1;
		private var _vsHeavy:Number=1;
		private var _myHeight:uint=0;
		private var _energyDrain:int=0;
		private var _ammoDrain:int=0;
		private var _owner:*;
		private var _calculator:Calculator=new Calculator();
		private var _direction:Point;
		public function Weapon(wld:*,firedBy:*,direction:Point)
		{
			super();
			_owner=firedBy;
			_direction=direction;
			var vector:Object=_calculator.point2point(_owner,_direction);
			
			
			vx=vector.vx;
			vy=vector.vy;
			faction=_owner.faction;
			setHeight=_owner.myHeight;
			//trace(this,_myHeight,_owner.myHeight);
			x=_owner.x;
			y=_owner.y;
			world=wld;
		}		
		
		public function get myHeight():uint
		{
			return _myHeight;
		}

		public function set setHeight(value:uint):void
		{
			_myHeight = value;
		}

		public function get owner():*
		{
			return _owner;
		}

		public function set owner(value:*):void
		{
			_owner = value;
		}


	}
}